package io;

import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo1 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("datac.txt");
        String str = "我们之间的回忆,全部都小心的收集,我总是偷偷的哭泣，像倦鸟失去了归期，但愿我相信的爱情，结局是握在我手心";
        byte[]data = str.getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        System.out.println("输出完毕");
    }

}
